package com.blockmeta.bbs.immodule.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.blockmeta.bbs.immodule.net.pojo.IMServer;

import java.util.ArrayList;
import java.util.List;

/**
 */

public class IMServerPOJO implements Parcelable{

    public List<IMServer> servers;

    public IMServerPOJO(List<IMServer> mServers) {
        servers = mServers;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeList(this.servers);
    }


    public IMServerPOJO(Parcel in) {
        this.servers = new ArrayList<IMServer>();
        in.readList(this.servers, IMServer.class.getClassLoader());
    }

    public static final Creator<IMServerPOJO> CREATOR = new Creator<IMServerPOJO>() {
        @Override
        public IMServerPOJO createFromParcel(Parcel source) {
            return new IMServerPOJO(source);
        }

        @Override
        public IMServerPOJO[] newArray(int size) {
            return new IMServerPOJO[size];
        }
    };
}
